<script setup>
const goodsList = [
  {
    id: 1,
    picture: 'https://img1.vvic.com/upload/1591281291261_250457.jpg',
    name: '一双男鞋',
    desc: '一双好穿的男鞋',
    price: 200.00
  },
  {
    id: 2,
    picture: 'https://ts1.cn.mm.bing.net/th/id/R-C.83d11cee42ab0934ffde47383956261e?rik=6Tp7xyT9k0Q%2bEw&riu=http%3a%2f%2fi03.c.aliimg.com%2fimg%2fibank%2f2014%2f825%2f235%2f1666532528_1488342456.jpg&ehk=TZAjM037zQWA9x2PSwFarH7Xi0dgpH4T1mZCr1TG8a0%3d&risl=&pid=ImgRaw&r=0',
    name: '女士高跟鞋',
    desc: '时尚优雅的高跟鞋',
    price: 300.00
  },
  {
    id: 3,
    picture: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.TdkvC0aDXKhy5Y5iK5iCNwHaHM?rs=1&pid=ImgDetMain',
    name: '运动跑鞋',
    desc: '轻便舒适的运动跑鞋',
    price: 250.00
  }
]
</script>


<template>
  <div class="goods-hot">
    <h3>热销榜</h3>
    <!-- 商品区块 -->
    <RouterLink to="/" class="goods-item" v-for="item in goodsList" :key="item.id">
      <img :src="item.picture" alt="" />
      <p class="name ellipsis">{{ item.name }}</p>
      <p class="desc ellipsis">{{ item.desc }}</p>
      <p class="price">&yen;{{ item.price }}</p>
    </RouterLink>
  </div>
</template>


<style scoped lang="scss">
.goods-hot {
  h3 {
    height: 70px;
    background: #FA5566;
    color: #fff;
    font-size: 18px;
    line-height: 70px;
    padding-left: 25px;
    margin-bottom: 10px;
    font-weight: normal;
  }

  .goods-item {
    display: block;
    padding: 20px 30px;
    text-align: center;
    background: #fff;

    img {
      width: 160px;
      height: 160px;
    }

    p {
      padding-top: 10px;
    }

    .name {
      font-size: 16px;
    }

    .desc {
      color: #999;
      height: 29px;
    }

    .price {
      color: $priceColor;
      font-size: 20px;
    }
  }
}
</style>